package work.mediway.mdm.core.enums;

import java.util.HashMap;
import java.util.Map;

import lombok.Getter;
import lombok.Setter;

/**
 * 状态
 *
 * @author zhongyj <1126834403@qq.com><br/>
 * @date 2020/12/29
 */
public enum TablePrefixEnum {

    /**
     * DR_ProcessCategory
     */
    DR_ProcessCategory("DR_ProcessCategory", "PC", "DRPC_Code"),

    CT_BusinessField("CT_BusinessField", "BF", "CTBF_Code"),
    /**
     * DR_ProcessTitle
     */
    DR_ProcessTitle("DR_ProcessTitle", "PT", "DRPT_Code"),

    /**
     * SS_DictForm
     */
    SS_DictForm("SS_DictForm", "FORM", "SSDF_Code"),

    Manufacturer_Systems("Manufacturer_Systems", "SYS", "ManufSystem_Code"),

    SM_Manage("SM_Manage", "REG", "sm_code"),

    SM_Method("SM_Method", "REGM", "method_code"),

    SM_Message("SM_Message", "MSG", "msg_code"),

    ss_dict_type("SS_DictType", "", "type_id"),

    SS_InterSystems("SS_InterSystems", "SSIS", "SSIS_Code"),

    HOS_Organization("HOS_Organization", "ORG", "ORG_Code"),


    // ======================================================================= //
    ;

    public static Map<String, String> map = new HashMap<>();

    static {
        TablePrefixEnum[] values = TablePrefixEnum.values();
        if (values.length > 0) {
            for (TablePrefixEnum categoryEnum : values) {
                map.put(categoryEnum.getTable(), categoryEnum.getPrefix());
            }
        }
    }

    TablePrefixEnum(String table, String prefix, String column) {
        this.table = table;
        this.prefix = prefix;
        this.column = column;
    }


    @Setter
    @Getter
    private String table;


    @Setter
    @Getter
    private String prefix;

    @Setter
    @Getter
    private String column;

}
